package com.iotek.ssm.controller;

import com.iotek.ssm.pojo.CustomQueryVo;
import com.iotek.ssm.pojo.RewardPunishment;
import com.iotek.ssm.service.RewardPunishmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/rp")
public class RewardPunishmentController {

    @Autowired
    private RewardPunishmentService rewardPunishmentService;

    @RequestMapping("/findRPList")
    @ResponseBody
    public List<RewardPunishment> findRPList(CustomQueryVo customQueryVo){
        List<RewardPunishment> rpList = null;
        try {
            rpList = rewardPunishmentService.findRewardInformation(customQueryVo);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return rpList;
    }
}
